    Patent literature 1: JP 2014-35729 A
Patent literature 1 describes a microcontroller that can be used as a controller for a vehicle. The microcontroller includes a CPU, a nonvolatile memory, and a volatile memory. The nonvolatile memory provides a memory module with a bit error detection function. The memory module includes an error correcting code (ECC) as a redundant data and is capable of both of error detection and error correction on an error of a single bit. However, on an error of two bits or more, the memory module is capable of error detection but is incapable of error correction. Hereinafter, to detect the uncorrectable error is referred to as an ECC error. The uncorrectable error may be the error of two bits or more, for example.
The inventors of the present application have found the following.
In many cases, the nonvolatile memory stores data that needs to be maintained for a long period of time. The ECC error in the data may be considered as a critical hardware error. When the ECC error occurs, a reset in an interrupt handler or erasure in the nonvolatile memory may be performed in general. When the ECC error occurs, the microcontroller cannot continue data process.
A cause of ECC error occurrence includes a nonvolatile memory failure and an access to an incomplete data area resulting from a power-off event that may occur while data is written to or erased from the nonvolatile memory. A key manipulation in a vehicle turns off a power supply when the microcontroller is used as a vehicle ECU. In this case, a user enables to operate the key manipulation arbitrary. The power-off event may occur while data is written to or erased from the nonvolatile memory. A conventional microcontroller performs a reset operation in response to the power-off event and cannot continue operation. Thus, the conventional microcontroller may be inappropriate to be used as an ECU mounted on vehicles.